<template>
  <div>
        <mt-header fixed title="疯子的小项目">
      <router-link to="/" slot="left">
        <mt-button icon="back">返回</mt-button>
      </router-link>

    </mt-header>
    <ul>
      <li v-for="(item,index) in newslist" :key="item.aid">
        <router-link :to="'/newslist/newsinfo/'+ item.aid" ><span>{{index+1+'.'}}{{item.title}}</span></router-link>
        </li>
    </ul>
  </div>
</template>

<script>
export default {
  data(){
    return{
      newslist: []
    }
  },

  mounted(){
    this.getData()
  },
  methods:{
    getData(){
      this.$http.jsonp("http://www.phonegap100.com/appapi.php?a=getPortalList&catid=20&page=1").then((Response) =>{

        // console.log(Response)
        this.newslist = Response.body.result
      })
    }
  }
}
</script>

<style scoped>

  li{

    line-height: 35px;
    font-size: 12px;


  }
  span{
    font-size: 16px;
    color: #666;
        border-bottom: 1px solid #ccc;

  }

</style>

